﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MaximumLength
{
    class MaximumLength
    {
        static void Main(string[] args)
        {
            string[] text = new string[] {"Kobra", "Whale", "Palindrom","Cat",
            "Forever","Love","Sleep","Late","Integer"};
            
            //Get the max length
            var maxLength = (from length in text
                             select length.Length).Max();

            //Get the word with max length
            var maxWord = (from word in text
                           where word.Length==maxLength
                           select word).Max();

            Console.WriteLine(maxWord);
        }
    }
}
